package com.ruoyi.lvlian.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotNull;
import java.util.List;


@Data
@ToString
@ApiModel(value = "产品分类对象", description = "产品分类对象")
public class ProductCategory {
    private static final long serialVersionUID = 1L;

    private Long id;
    private Long categoryId;

    private String name;
    @NotNull(message = "level不能为空") // 这是实际的验证注解
    private String level;

    private Long parentId;

    private String createUser;

    private boolean viewFlag;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private String createDate;
    private List<ProductCategory> child;

    @ApiModelProperty(value = "产品列表（仅二级节点有此字段）")
    private Product product;

    @ExcelProperty("所属公司编码")
    @ApiModelProperty(value = "所属公司组织")
    private String orgCode;

    private String dataSource;

    @ApiModelProperty(value = "启用禁用")
    private int status;
    @ApiModelProperty(value = "分类编码")
    private String code;
}
